package com.molyfun.parents.zhibo.im;

import android.os.Parcel;
import android.os.Parcelable;

import java.io.Serializable;
import java.util.List;

public class GalleryEntity implements Serializable ,Parcelable{
	private String id;

	private String type;

	private String courseId;

	private String url;
	private String bigurl;

	private String gameId;

	private long createdatetime;

	private String createdatetimeStr;

	private String content;

	private String name;

	private String galleryName;

	private int versionCode;

	private String logo;
	private int state;
	private int inuse = 0;
	private String offlineUrl;
	private String gtype;
	private String isFile;
	private List<GalleryEntity> listParent;
	private List<GalleryEntity> listSeed;
	private String cate;//1:网络 2:机构素材
	private String cover;
	private String timelen;

	protected GalleryEntity(Parcel in) {
		id = in.readString();
		type = in.readString();
		courseId = in.readString();
		url = in.readString();
		bigurl = in.readString();
		gameId = in.readString();
		createdatetime = in.readLong();
		createdatetimeStr = in.readString();
		content = in.readString();
		name = in.readString();
		galleryName = in.readString();
		versionCode = in.readInt();
		logo = in.readString();
		state = in.readInt();
		inuse = in.readInt();
		offlineUrl = in.readString();
		gtype = in.readString();
		isFile = in.readString();
		listParent = in.createTypedArrayList(GalleryEntity.CREATOR);
		listSeed = in.createTypedArrayList(GalleryEntity.CREATOR);
		cate = in.readString();
		cover = in.readString();
		timelen = in.readString();
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(id);
		dest.writeString(type);
		dest.writeString(courseId);
		dest.writeString(url);
		dest.writeString(bigurl);
		dest.writeString(gameId);
		dest.writeLong(createdatetime);
		dest.writeString(createdatetimeStr);
		dest.writeString(content);
		dest.writeString(name);
		dest.writeString(galleryName);
		dest.writeInt(versionCode);
		dest.writeString(logo);
		dest.writeInt(state);
		dest.writeInt(inuse);
		dest.writeString(offlineUrl);
		dest.writeString(gtype);
		dest.writeString(isFile);
		dest.writeTypedList(listParent);
		dest.writeTypedList(listSeed);
		dest.writeString(cate);
		dest.writeString(cover);
		dest.writeString(timelen);
	}

	@Override
	public int describeContents() {
		return 0;
	}

	public static final Creator<GalleryEntity> CREATOR = new Creator<GalleryEntity>() {
		@Override
		public GalleryEntity createFromParcel(Parcel in) {
			return new GalleryEntity(in);
		}

		@Override
		public GalleryEntity[] newArray(int size) {
			return new GalleryEntity[size];
		}
	};

	public String getCover() {
		return cover;
	}

	public void setCover(String cover) {
		this.cover = cover;
	}

	public String getTimelen() {
		return timelen;
	}

	public void setTimelen(String timelen) {
		this.timelen = timelen;
	}

	public String getCate() {
		return cate;
	}

	public void setCate(String cate) {
		this.cate = cate;
	}

	public GalleryEntity() {
	}

	public String getGtype() {
		return gtype;
	}

	public void setGtype(String gtype) {
		this.gtype = gtype;
	}

	public String getIsFile() {
		return isFile;
	}

	public void setIsFile(String isFile) {
		this.isFile = isFile;
	}

	public List<GalleryEntity> getListParent() {
		return listParent;
	}

	public void setListParent(List<GalleryEntity> listParent) {
		this.listParent = listParent;
	}

	public List<GalleryEntity> getListSeed() {
		return listSeed;
	}

	public void setListSeed(List<GalleryEntity> listSeed) {
		this.listSeed = listSeed;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getCourseId() {
		return courseId;
	}

	public void setCourseId(String courseId) {
		this.courseId = courseId;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getBigurl() {
		return bigurl;
	}

	public void setBigurl(String bigurl) {
		this.bigurl = bigurl;
	}

	public String getGameId() {
		return gameId;
	}

	public void setGameId(String gameId) {
		this.gameId = gameId;
	}

	public long getCreatedatetime() {
		return createdatetime;
	}

	public void setCreatedatetime(long createdatetime) {
		this.createdatetime = createdatetime;
	}

	public String getCreatedatetimeStr() {
		return createdatetimeStr;
	}

	public void setCreatedatetimeStr(String createdatetimeStr) {
		this.createdatetimeStr = createdatetimeStr;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getGalleryName() {
		return galleryName;
	}

	public void setGalleryName(String galleryName) {
		this.galleryName = galleryName;
	}

	public int getVersionCode() {
		return versionCode;
	}

	public void setVersionCode(int versionCode) {
		this.versionCode = versionCode;
	}

	public String getLogo() {
		return logo;
	}

	public void setLogo(String logo) {
		this.logo = logo;
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	public int getInuse() {
		return inuse;
	}

	public void setInuse(int inuse) {
		this.inuse = inuse;
	}

	public String getOfflineUrl() {
		return offlineUrl;
	}

	public void setOfflineUrl(String offlineUrl) {
		this.offlineUrl = offlineUrl;
	}

	public static interface GalleryType{
		//1 图片 2视频 3音频 4游戏
		public static final String COURSE_IMAGE = "1";
		public static final String COURSE_MUSIC = "3";
		public static final String COURSE_GAME = "4";
		public static final String COURSE_VIDEO = "2";
	}


	@Override
	public String toString() {
		return "GalleryEntity [id=" + id + ", type=" + type + ", courseId="
				+ courseId + ", url=" + url + ", gameId=" + gameId
				+ ", createdatetime=" + createdatetime + ", createdatetimeStr="
				+ createdatetimeStr + ", content=" + content + ", name=" + name
				+ ", galleryName=" + galleryName + ", logo=" + logo + "]";
	}

}
